<?php

namespace Users\Recover;

class GenerateCodeFormConfig extends \Pinenut\Config {

	static $config = [
		'htmlOptions' => array(
			'method' => 'POST'
		),
		'elements' => array(
			'email' => array(
				'type' => 'text',
				'htmlOptions' => array(
					'placeholder' => 'E-mail'
				),
				'filters' => 'trim',
				'validators' => [
					'notEmpty',
					'recordNotExists' => array(
						'className' => '\Pinenut\User\Auth\EmailPassword',
						'where' => [
							'type' => 'emailPassword'
						],
						'whereValue' => 'email'
					),
				]
			),
			'submit' => array(
				'value' => 'Send',
				'type' => 'submit'
			)
		)
	];

}
